\(\int x^{-1+4 n} (a+b x^n)^p \, dx\) [2723]
Optimal result
Integrand size = 17, antiderivative size = 103 \[
\int x^{-1+4 n} \left (a+b x^n\right )^p \, dx=-\frac {a^3 \left (a+b x^n\right )^{1+p}}{b^4 n (1+p)}+\frac {3 a^2 \left (a+b x^n\right )^{2+p}}{b^4 n (2+p)}-\frac {3 a \left (a+b x^n\right )^{3+p}}{b^4 n (3+p)}+\frac {\left (a+b x^n\right )^{4+p}}{b^4 n (4+p)}
\]
[Out]
-a^3*(a+b*x^n)^(p+1)/b^4/n/(p+1)+3*a^2*(a+b*x^n)^(2+p)/b^4/n/(2+p)-3*a*(a+b*x^n)^(3+p)/b^4/n/(3+p)+(a+b*x^n)^(
4+p)/b^4/n/(4+p)
Rubi [A] (verified)
Time = 0.04 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.00,
number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {272, 45}
\[
\int x^{-1+4 n} \left (a+b x^n\right )^p \, dx=-\frac {a^3 \left (a+b x^n\right )^{p+1}}{b^4 n (p+1)}+\frac {3 a^2 \left (a+b x^n\right )^{p+2}}{b^4 n (p+2)}-\frac {3 a \left (a+b x^n\right )^{p+3}}{b^4 n (p+3)}+\frac {\left (a+b x^n\right )^{p+4}}{b^4 n (p+4)}
\]
[In]
Int[x^(-1 + 4*n)*(a + b*x^n)^p,x]
[Out]
-((a^3*(a + b*x^n)^(1 + p))/(b^4*n*(1 + p))) + (3*a^2*(a + b*x^n)^(2 + p))/(b^4*n*(2 + p)) - (3*a*(a + b*x^n)^
(3 + p))/(b^4*n*(3 + p)) + (a + b*x^n)^(4 + p)/(b^4*n*(4 + p))
Rule 45
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])
Rule 272
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]
Rubi steps \begin{align*}
\text {integral}& = \frac {\text {Subst}\left (\int x^3 (a+b x)^p \, dx,x,x^n\right )}{n} \\ & = \frac {\text {Subst}\left (\int \left (-\frac {a^3 (a+b x)^p}{b^3}+\frac {3 a^2 (a+b x)^{1+p}}{b^3}-\frac {3 a (a+b x)^{2+p}}{b^3}+\frac {(a+b x)^{3+p}}{b^3}\right ) \, dx,x,x^n\right )}{n} \\ & = -\frac {a^3 \left (a+b x^n\right )^{1+p}}{b^4 n (1+p)}+\frac {3 a^2 \left (a+b x^n\right )^{2+p}}{b^4 n (2+p)}-\frac {3 a \left (a+b x^n\right )^{3+p}}{b^4 n (3+p)}+\frac {\left (a+b x^n\right )^{4+p}}{b^4 n (4+p)} \\
\end{align*}
Mathematica [A] (verified)
Time = 0.14 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.76
\[
\int x^{-1+4 n} \left (a+b x^n\right )^p \, dx=\frac {\left (a+b x^n\right )^{1+p} \left (-\frac {a^3}{1+p}+\frac {3 a^2 \left (a+b x^n\right )}{2+p}-\frac {3 a \left (a+b x^n\right )^2}{3+p}+\frac {\left (a+b x^n\right )^3}{4+p}\right )}{b^4 n}
\]
[In]
Integrate[x^(-1 + 4*n)*(a + b*x^n)^p,x]
[Out]
((a + b*x^n)^(1 + p)*(-(a^3/(1 + p)) + (3*a^2*(a + b*x^n))/(2 + p) - (3*a*(a + b*x^n)^2)/(3 + p) + (a + b*x^n)
^3/(4 + p)))/(b^4*n)
Maple [A] (verified)
Time = 4.13 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.66
| | |
method | result | size |
| | |
risch |
\(-\frac {\left (-b^{4} p^{3} x^{4 n}-a \,b^{3} p^{3} x^{3 n}-6 b^{4} p^{2} x^{4 n}-3 a \,b^{3} p^{2} x^{3 n}-11 b^{4} p \,x^{4 n}+3 a^{2} b^{2} p^{2} x^{2 n}-2 a p \,x^{3 n} b^{3}-6 x^{4 n} b^{4}+3 a^{2} p \,x^{2 n} b^{2}-6 a^{3} p \,x^{n} b +6 a^{4}\right ) \left (a +b \,x^{n}\right )^{p}}{\left (3+p \right ) \left (4+p \right ) \left (2+p \right ) \left (1+p \right ) n \,b^{4}}\) |
\(171\) |
| | |
|
|
|
[In]
int(x^(-1+4*n)*(a+b*x^n)^p,x,method=_RETURNVERBOSE)
[Out]
-(-b^4*p^3*(x^n)^4-a*b^3*p^3*(x^n)^3-6*b^4*p^2*(x^n)^4-3*a*b^3*p^2*(x^n)^3-11*b^4*p*(x^n)^4+3*a^2*b^2*p^2*(x^n
)^2-2*a*p*(x^n)^3*b^3-6*(x^n)^4*b^4+3*a^2*p*(x^n)^2*b^2-6*a^3*p*x^n*b+6*a^4)/(3+p)/(4+p)/(2+p)/(1+p)/n/b^4*(a+
b*x^n)^p
Fricas [A] (verification not implemented)
none
Time = 0.25 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.53
\[
\int x^{-1+4 n} \left (a+b x^n\right )^p \, dx=\frac {{\left (6 \, a^{3} b p x^{n} - 6 \, a^{4} + {\left (b^{4} p^{3} + 6 \, b^{4} p^{2} + 11 \, b^{4} p + 6 \, b^{4}\right )} x^{4 \, n} + {\left (a b^{3} p^{3} + 3 \, a b^{3} p^{2} + 2 \, a b^{3} p\right )} x^{3 \, n} - 3 \, {\left (a^{2} b^{2} p^{2} + a^{2} b^{2} p\right )} x^{2 \, n}\right )} {\left (b x^{n} + a\right )}^{p}}{b^{4} n p^{4} + 10 \, b^{4} n p^{3} + 35 \, b^{4} n p^{2} + 50 \, b^{4} n p + 24 \, b^{4} n}
\]
[In]
integrate(x^(-1+4*n)*(a+b*x^n)^p,x, algorithm="fricas")
[Out]
(6*a^3*b*p*x^n - 6*a^4 + (b^4*p^3 + 6*b^4*p^2 + 11*b^4*p + 6*b^4)*x^(4*n) + (a*b^3*p^3 + 3*a*b^3*p^2 + 2*a*b^3
*p)*x^(3*n) - 3*(a^2*b^2*p^2 + a^2*b^2*p)*x^(2*n))*(b*x^n + a)^p/(b^4*n*p^4 + 10*b^4*n*p^3 + 35*b^4*n*p^2 + 50
*b^4*n*p + 24*b^4*n)
Sympy [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 1669 vs. \(2 (85) = 170\).
Time = 137.67 (sec) , antiderivative size = 1669, normalized size of antiderivative = 16.20
\[
\int x^{-1+4 n} \left (a+b x^n\right )^p \, dx=\text {Too large to display}
\]
[In]
integrate(x**(-1+4*n)*(a+b*x**n)**p,x)
[Out]
Piecewise((a**p*x*x**(4*n - 1)/(4*n), Eq(b, 0)), ((a + b)**p*log(x), Eq(n, 0)), (6*a**3*log(a/b + x**n)/(6*a**
3*b**4*n + 18*a**2*b**5*n*x**n + 18*a*b**6*n*x**(2*n) + 6*b**7*n*x**(3*n)) + 11*a**3/(6*a**3*b**4*n + 18*a**2*
b**5*n*x**n + 18*a*b**6*n*x**(2*n) + 6*b**7*n*x**(3*n)) + 18*a**2*b*x**n*log(a/b + x**n)/(6*a**3*b**4*n + 18*a
**2*b**5*n*x**n + 18*a*b**6*n*x**(2*n) + 6*b**7*n*x**(3*n)) + 27*a**2*b*x**n/(6*a**3*b**4*n + 18*a**2*b**5*n*x
**n + 18*a*b**6*n*x**(2*n) + 6*b**7*n*x**(3*n)) + 18*a*b**2*x**(2*n)*log(a/b + x**n)/(6*a**3*b**4*n + 18*a**2*
b**5*n*x**n + 18*a*b**6*n*x**(2*n) + 6*b**7*n*x**(3*n)) + 18*a*b**2*x**(2*n)/(6*a**3*b**4*n + 18*a**2*b**5*n*x
**n + 18*a*b**6*n*x**(2*n) + 6*b**7*n*x**(3*n)) + 6*b**3*x**(3*n)*log(a/b + x**n)/(6*a**3*b**4*n + 18*a**2*b**
5*n*x**n + 18*a*b**6*n*x**(2*n) + 6*b**7*n*x**(3*n)), Eq(p, -4)), (-6*a**3*log(a/b + x**n)/(2*a**2*b**4*n + 4*
a*b**5*n*x**n + 2*b**6*n*x**(2*n)) - 9*a**3/(2*a**2*b**4*n + 4*a*b**5*n*x**n + 2*b**6*n*x**(2*n)) - 12*a**2*b*
x**n*log(a/b + x**n)/(2*a**2*b**4*n + 4*a*b**5*n*x**n + 2*b**6*n*x**(2*n)) - 12*a**2*b*x**n/(2*a**2*b**4*n + 4
*a*b**5*n*x**n + 2*b**6*n*x**(2*n)) - 6*a*b**2*x**(2*n)*log(a/b + x**n)/(2*a**2*b**4*n + 4*a*b**5*n*x**n + 2*b
**6*n*x**(2*n)) + 2*b**3*x**(3*n)/(2*a**2*b**4*n + 4*a*b**5*n*x**n + 2*b**6*n*x**(2*n)), Eq(p, -3)), (6*a**3*l
og(a/b + x**n)/(2*a*b**4*n + 2*b**5*n*x**n) + 6*a**3/(2*a*b**4*n + 2*b**5*n*x**n) + 6*a**2*b*x**n*log(a/b + x*
*n)/(2*a*b**4*n + 2*b**5*n*x**n) - 3*a*b**2*x**(2*n)/(2*a*b**4*n + 2*b**5*n*x**n) + b**3*x**(3*n)/(2*a*b**4*n
+ 2*b**5*n*x**n), Eq(p, -2)), (-a**3*log(a/b + x**n)/(b**4*n) + a**2*x**n/(b**3*n) - a*x**(2*n)/(2*b**2*n) + x
**(3*n)/(3*b*n), Eq(p, -1)), (-6*a**4*(a + b*x**n)**p/(b**4*n*p**4 + 10*b**4*n*p**3 + 35*b**4*n*p**2 + 50*b**4
*n*p + 24*b**4*n) + 6*a**3*b*p*x**n*(a + b*x**n)**p/(b**4*n*p**4 + 10*b**4*n*p**3 + 35*b**4*n*p**2 + 50*b**4*n
*p + 24*b**4*n) - 3*a**2*b**2*p**2*x**(2*n)*(a + b*x**n)**p/(b**4*n*p**4 + 10*b**4*n*p**3 + 35*b**4*n*p**2 + 5
0*b**4*n*p + 24*b**4*n) - 3*a**2*b**2*p*x**(2*n)*(a + b*x**n)**p/(b**4*n*p**4 + 10*b**4*n*p**3 + 35*b**4*n*p**
2 + 50*b**4*n*p + 24*b**4*n) + a*b**3*p**3*x**(3*n)*(a + b*x**n)**p/(b**4*n*p**4 + 10*b**4*n*p**3 + 35*b**4*n*
p**2 + 50*b**4*n*p + 24*b**4*n) + 3*a*b**3*p**2*x**(3*n)*(a + b*x**n)**p/(b**4*n*p**4 + 10*b**4*n*p**3 + 35*b*
*4*n*p**2 + 50*b**4*n*p + 24*b**4*n) + 2*a*b**3*p*x**(3*n)*(a + b*x**n)**p/(b**4*n*p**4 + 10*b**4*n*p**3 + 35*
b**4*n*p**2 + 50*b**4*n*p + 24*b**4*n) + b**4*p**3*x**(4*n)*(a + b*x**n)**p/(b**4*n*p**4 + 10*b**4*n*p**3 + 35
*b**4*n*p**2 + 50*b**4*n*p + 24*b**4*n) + 6*b**4*p**2*x**(4*n)*(a + b*x**n)**p/(b**4*n*p**4 + 10*b**4*n*p**3 +
35*b**4*n*p**2 + 50*b**4*n*p + 24*b**4*n) + 11*b**4*p*x**(4*n)*(a + b*x**n)**p/(b**4*n*p**4 + 10*b**4*n*p**3
+ 35*b**4*n*p**2 + 50*b**4*n*p + 24*b**4*n) + 6*b**4*x**(4*n)*(a + b*x**n)**p/(b**4*n*p**4 + 10*b**4*n*p**3 +
35*b**4*n*p**2 + 50*b**4*n*p + 24*b**4*n), True))
Maxima [A] (verification not implemented)
none
Time = 0.23 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.11
\[
\int x^{-1+4 n} \left (a+b x^n\right )^p \, dx=\frac {{\left ({\left (p^{3} + 6 \, p^{2} + 11 \, p + 6\right )} b^{4} x^{4 \, n} + {\left (p^{3} + 3 \, p^{2} + 2 \, p\right )} a b^{3} x^{3 \, n} - 3 \, {\left (p^{2} + p\right )} a^{2} b^{2} x^{2 \, n} + 6 \, a^{3} b p x^{n} - 6 \, a^{4}\right )} {\left (b x^{n} + a\right )}^{p}}{{\left (p^{4} + 10 \, p^{3} + 35 \, p^{2} + 50 \, p + 24\right )} b^{4} n}
\]
[In]
integrate(x^(-1+4*n)*(a+b*x^n)^p,x, algorithm="maxima")
[Out]
((p^3 + 6*p^2 + 11*p + 6)*b^4*x^(4*n) + (p^3 + 3*p^2 + 2*p)*a*b^3*x^(3*n) - 3*(p^2 + p)*a^2*b^2*x^(2*n) + 6*a^
3*b*p*x^n - 6*a^4)*(b*x^n + a)^p/((p^4 + 10*p^3 + 35*p^2 + 50*p + 24)*b^4*n)
Giac [F]
\[
\int x^{-1+4 n} \left (a+b x^n\right )^p \, dx=\int { {\left (b x^{n} + a\right )}^{p} x^{4 \, n - 1} \,d x }
\]
[In]
integrate(x^(-1+4*n)*(a+b*x^n)^p,x, algorithm="giac")
[Out]
integrate((b*x^n + a)^p*x^(4*n - 1), x)
Mupad [F(-1)]
Timed out. \[
\int x^{-1+4 n} \left (a+b x^n\right )^p \, dx=\int x^{4\,n-1}\,{\left (a+b\,x^n\right )}^p \,d x
\]
[In]
int(x^(4*n - 1)*(a + b*x^n)^p,x)
[Out]
int(x^(4*n - 1)*(a + b*x^n)^p, x)